﻿--[[
   @brief    social network
   @author   rickonzhang
   @version  1.0
   @date     2015-06-23
--]]

social_network_desc = 
{
    module_name = "social_network",
    events = 
    {
        {
            c_event = 
            {
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_OPEN_PERSONAL_CENTER,
                    callback = "social_network_control.on_open_personal_center"
                },
                {
                    id = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_IM_INITED,
                    callback = "social_network_control.on_im_inited"
                }
            },

            lua_event = 
            {
                {
                    id = layout_event.RESTORE_LAYOUT_FINISH,
                    callback = "social_network_control.load_layout_finish"
                },
                {
                    id = social_event.WEB_CALL_SOCIAL,
                    callback = "social_network_control.web_call_social_event"
                },
            },

            reg_service = 
            {
                {
                    id = 'i_service_social_open_qq_friend_panel',
                    callback = 'social_network_control.open_qq_friend_panel'
                },
                {
                    id = 'i_service_social_open_game_friend_panel',
                    callback = 'social_network_control.open_game_friend_panel'
                },
                {
                    id = 'i_service_social_open_search_pannel',
                    callback = 'social_network_control.open_search_pannel'
                },
                {
                    id = 'i_service_social_add_friend',
                    callback = 'social_network_control.add_friend'
                },
                {
                    id = 'i_service_social_is_my_friend',
                    callback = 'social_network_control.is_my_friend'
                },
                {
                    id = 'i_service_social_get_my_info',
                    callback = 'social_network_control.get_my_info'
                },
                {
                    id = 'i_service_social_open_person_center',
                    callback = 'social_network_control.open_person_center'
                },
                {
                    id = 'i_service_social_begin_talk_with_friend',
                    callback = 'social_network_control.begin_talk_with_friend'
                },
                {
                    id = 'i_service_social_begin_talk_with_group',
                    callback = 'social_network_control.begin_talk_with_group'
                },
                {
                    id = 'i_service_social_get_common_topic_js_info',
                    callback = 'social_network_control.get_common_topic_js_info'
                },
                {
                    id = 'i_service_social_open_game_detail_web_page',
                    callback = 'social_network_control.open_game_detial_web_page'
                },
                {
                    id = 'i_service_report_social_network_quality',
                    callback = 'social_network_control.service_report_social_network_quality'
                },
                {
                    id = 'i_service_social_get_friend_playing_game',
                    callback = 'social_network_control.get_friend_playing_game'
                },
                {
                    id = 'i_service_social_open_game_web_page',
                    callback = "social_network_control.open_game_web_page"
                },
                {
                    id = 'i_service_social_get_all_game_id_list',
                    callback = "social_network_control.get_all_game_id_list"
                },
            },
            listen_broadcast = 
            {
                {
                    id = 'i_broadcast_pallas_to_social',
                    callback = 'social_network_control.pallas_to_social'
                },
                {
                    id = 'i_broadcast_social_network_http_task_rsp',
                    callback = 'social_network_control.http_task_rsp'
                },
                {
                    id = 'i_brdcst_self_info_update',
                    callback = 'social_network_control.on_self_info_update'
                },
            },
            lua_file = "social\\control.lua"
        },

        {
            c_event = 
            {
                {
                    id  = ierd_tgp.social_network.SOCIAL_NETWORK_EVENT_GET_GROUP_LIST,
                    callback = "social_remote_cfg_mgr.get_group_list_done"
                },
            },
            lua_event = 
            {
            },
            reg_service = 
            {
                {
                    id = 'i_service_social_save_remote_cfg',
                    callback = "social_remote_cfg_mgr.save_remote_cfg"
                },
                {
                    id = 'i_service_social_get_remote_cfg',
                    callback = "social_remote_cfg_mgr.get_remote_cfg"
                },
            },
            listen_broadcast = 
            {
                {
                    id = 'i_broadcast_social_network_get_remote_cfg',
                    callback = "social_remote_cfg_mgr.on_get_remote_cfg"
                },
            },
            lua_file = "social\\social_remote_cfg_mgr.lua"
        },        
    },
}

desc_mgr.add(social_network_desc) 

ierd_tgp.tpf_ui.Require("social\\social_services.lua");